﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string num = txtNum.Text.Trim();
        string pw = txtPw.Text.Trim();
        kh tmp = new kh();
        tmp.num = num;
        tmp.pw = pw;
        int result = tmp.Login(tmp);
        if (result > 0)
        {
            Session["tmpNum"] = num;//session会话变量
            Response.Redirect("~\\firstkh.aspx");
        }
        else
        {
            Response.Write("<script>alert(\"对不起，输入的其中一项有误有误！\")</script>");
        }
    }

   
}